package 
{
	import com.grouuu.core.Scene;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import starling.core.Starling;

	/**
	 * v1
	 * @author Grouuu
	 */
	
	[SWF(frameRate = "60", backgroundColor = "#FFFFFF", width = "320", height = "480")]
	
	public class Main extends Sprite 
	{
		protected var starling:Starling;
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}

		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			starling = new Starling(Scene, stage);
			starling.antiAliasing = 1;
			starling.start();
		}
	}
}